/**
 * Created by Dalyn on 2017/3/15.
 */
import Relay from "react-relay";

export default class FindServiceDicListMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { findServiceDicList }`;
    }

    getVariables() {
        return {
            argsInput: {
                parentId:this.props.parentId,
                name:this.props.name,
                dicId:this.props.dicId,
                enid:this.props.enid,
                level:this.props.level,
                requestPlat:"manager",
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on findServiceDicListPayload {
            data {  
                errorCode
                value
                totalResult
                id
                token
                enterpriseServiceDicList{
                    parentId
                    name
                    dicId
                    enid
                    level
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on findServiceDicListPayload {
                    data {
                        errorCode
                        value
                        totalResult
                        id
                        token
                        enterpriseServiceDicList{
                            parentId
                            name
                            dicId
                            enid
                            level
                        }
                       
                    }
                }
            `]
        }];
    }

}